import React, { Component } from 'react'

export default class Child extends Component {
  render() {
    return (
      <div>
        {/* #2 类组件通过 this.props 进行接收 */}
        <p>Child: {this.props.salary}</p>
        <p>Age: {this.props.age}</p>
      </div>
    )
  }
}

/* export default function Child(props) {
  return (
    <div>
      <p>Child: {props.salary}</p>
      <p>Age: {props.age}</p>
    </div>
  )
} */
